儿童价
编辑于: 2024-03-28 16:19
TABLE OF CONTENTS
介绍
儿童价是 GO Distributor v4.7 发布的一项新功能,支持当酒店集团按儿童年龄段来提供儿童价时,GO 透传给渠道的业务场景。
版本要求
GO版本 | 需要升级到 GO Distributor V4.7或更高版本吗? | 备注 |
---|---|---|
| 否 | 渠道调用实时检查或Shop ARI 接口时,GO将根据请求中的”儿童年龄”进行计算并返回对应的价格 |
| 是 | 需要升级以下两个接口: 1.BookingUSB的酒店产品接口 2.AvailabilityPeer的ARI推送接口 |
儿童价类型
目前 GO 支持四种儿童价类型,渠道可以通过 BookingUSB 酒店产品接口中的 childRateType 字段获取此类型。
儿童价类型 | 描述 |
---|---|
Normal | 入住成人与入住儿童组合价 |
ByAge | 根据入住儿童年龄收取对应儿童价 |
Free | 入住儿童免费 |
AsAdult | 入住儿童按成人价收取 |
文档中的定义
属性 | 类型 | 描述 |
---|---|---|
childRateType | 枚举 | 枚举:[Normal,ByAge,Free,AsAdult] 标示酒店儿童价类型 Normal:默认类型,入住成人与入住儿童组合价,与入住儿童年龄无关 ByAge:根据入住儿童年龄收取对应儿童价。此类型时 maxChildAge 字段提供最大儿童年龄设置。推送 ARI 时,儿童价由 extraChildRates 节点推送。 Free:入住儿童免费 AsAdult:入住儿童将按成人收费 |
maxChildAge | 整数 | 如果 childRateType 设置为 ByAge,则必须提供大于零的最大儿童年龄。 |
如何通过API获取childRateType指示符?
渠道调用 BookingUSB 酒店产品接口,通过 childRateType 字段获取标识,参见示例如下:
{ "hotelId": "GATHI", "hotelName": "This is a test hotel", "supplierId": "HILTON", "status": "Actived", "chainCode": "abc", "brandCode": "Waldorf", "longitude": 41.40338, "latitude": 2.17403, "city": "string", "country": "string", "state": "string", "address": [ "AddressLine1", "AddressLine2" ], "phone": { "countryAccessCode": "string", "areaCityCode": "string", "phoneNumber": "string" }, "settings": { "userName": "username", "password": "password" }, "ariType": "Daily", "timezone": "America/Los_Angeles", "rateType": "AmountBeforeTax", "maxChildAge": 17, "childRateType": "ByAge", "products": [...] }
如何通过 API 获取儿童价?
- 对于 GO v4 拉模式渠道
渠道无需修改程序代码,因为 GO 将根据请求中的成人数,儿童数及儿童年龄计算出总价并返回给渠道。
示例:shopping 两位成人,一位 8 岁儿童入住的 ARI 数据,GO 将计算并返回总价。
示例请求:
{ "header": { "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotels": [ { "supplierId": "HILTON", "hotelId": "GATHI", "status": "Actived" } ], "stayRange": { "checkin": "2022-01-01", "checkout": "2022-01-04" }, "roomCriteria": { "roomCount": 1, "adultCount": 2, "childCount": 1, "childAges": [8] } }
- 对于 GO v4 推模式渠道
重要信息:
GO Distributor v4.7及以上支持儿童价功能。低于此版本的渠道如要升级并支持儿童价,请联系我们 GO Help 团队。
如果酒店集团支持并提供儿童价,GO 将通过 AvailabilityPeer ARI Push 接口中 extraChilaRates 向渠道推送儿童价。
Daily ARI 推送示例如下:
{ "header": { "supplierId": "HILTON", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "GATHI", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "currency": "USD", "dailyAris": [ { "roomId": "K1", "rateId": "BARB", "mealPlans": [ "BB", "BB", "BB", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "extraChildRates": [ { "amountAfterTax": [ 50.00, 50.00, 50.00, 50.00 ], "amountBeforeTax": [ 40.00, 40.00, 40.00, 40.00 ], "maxAge": 2, "minAge": 0 }, { "amountAfterTax": [ 60.00, 60.00, 60.00, 60.00 ], "amountBeforeTax": [ 50.00, 50.00, 50.00, 50.00 ], "maxAge": 8, "minAge": 3 }, { "amountAfterTax": [ 70.00, 70.00, 70.00, 70.00 ], "amountBeforeTax": [ 60.00, 60.00, 60.00, 60.00 ], "maxAge": 17, "minAge": 9 } ], "type": "OccupancyRate", "rates": [ { "adultCount": 1, "amountBeforeTax": [ 502.19, 502.19, 502.19, 502.19 ], "amountAfterTax": [ 623.23, 623.23, 623.23, 623.23 ] }, { "adultCount": 2, "amountBeforeTax": [ 520.19, 520.19, 520.19, 520.19 ], "amountAfterTax": [ 641.23, 641.23, 641.23, 641.23 ] } ] }, "availStatuses": { "close": [ false, false, false, false ], "minStayArrival": [ 0, 2, 0, 0 ], "maxStayArrival": [ 0, 2, 0, 0 ], "minStayThrough": [ 0, 2, 0, 0 ], "maxStayThrough": [ 0, 2, 0, 0 ], "minAdvanceDay": [ 0, 2, 0, 0 ], "maxAdvanceDay": [ 365, 365, 365, 365 ], "cta": [ false, false, false, true ], "ctd": [ false, false, false, true ], "fplos": [ "1111111", "1001111", "1000001", "0000000" ] }, "rateChangeIndicators": [ true, false, true, false ] } ] }
LOS ARI 推送示例如下:
{ "header": { "supplierId": "HILTON", "distributorId": "GTA", "version": "v4", "token": "18393849028490234" }, "hotelId": "GATHI", "dateRange": { "startDate": "2018-01-01", "endDate": "2018-01-04" }, "currency": "USD", "losAris": [{ "roomId": "K1", "rateId": "BARB", "los": 1, "mealPlans": [ "BB", "BB", "RO", "BB" ], "inventories": [ 9, 0, 9, 9 ], "rates": { "extraChildRates": [{ "amountAfterTax": [ 50.00, 50.00, 50.00, 50.00 ], "amountBeforeTax": [ 40.00, 40.00, 40.00, 40.00 ], "maxAge": 2, "minAge": 0 }, { "amountAfterTax": [ 60.00, 60.00, 60.00, 60.00 ], "amountBeforeTax": [ 50.00, 50.00, 50.00, 50.00 ], "maxAge": 8, "minAge": 3 }, { "amountAfterTax": [ 70.00, 70.00, 70.00, 70.00 ], "amountBeforeTax": [ 60.00, 60.00, 60.00, 60.00 ], "maxAge": 17, "minAge": 9 } ], "type": "OccupancyRate", "rates": [{ "adultCount": 2, "childCount": 1, "amountBeforeTax": [ 502.19, 502.19, 502.19, 502.19 ], "amountAfterTax": [ 623.23, 623.23, 623.23, 623.23 ] } ] } } ] }
它是如何在GO v4.7 Push渠道API上工作的?
我们从 GO BookingUSB 的酒店产品 API 中删除了 2 个属性,并添加了一个新属性。
- 属性 freeChildAge 和 childPriceRules 将被删除。
- 添加属性 childRateType,用于指示酒店集团提供了哪种类型的儿童价。如果 childRateType 是 ByAge,则 maxChildAge 为必填属性,并且值大于0。示例如下:
{ "hotelId": "100001", "hotelName": "This is a test hotel", "distributorId": "GTA", "status": "Actived", "chainCode": "Marriott", "brandCode": "Courtyard", "longitude": 41.40338, "latitude": 2.17403, "city": "string", "country": "string", "state": "string", "address": [], "phone": {}, "settings": {}, "ariType": "Daily", "timezone": "America/Los_Angeles", "rateType": "AmountBeforeTax", "maxChildAge": 17, "childRateType": "ByAge", "products": [] }
我们在 AvailabilityPeer 的 ARI PUSH API 上添加了新属性 extraChilaRates,以反映 Rate 模型 OccupancyRate 中特定年龄段的儿童价格。
例如. 如果设置 maxChildAge=8,则示例响应如下:
"rates": { "type": "OccupancyRate", "rates": [ { "adultCount": 1, "amountBeforeTax": [ 100.00, 100.00, ], "amountAfterTax": [ 120.00, 120.00 ] }, { "adultCount": 2, "amountBeforeTax": [ 180.00, 180.00, ], "amountAfterTax": [ 200.00, 200.00 ] } ], "extraChildRates": [ { "minAge": 0, "maxAge": 2, "amountBeforeTax": [ 40.00, 40.00, ], "amountAfterTax": [ 50.00, 50.00 ] }, { "minAge": 3, "maxAge": 8, "amountBeforeTax": [ 50.00, 50.00, ], "amountAfterTax": [ 60.00, 60.00 ] } ] }
- 年龄范围将被明确定义且不重叠,例如,当 maxChildAge 为 12 时,年龄范围为 [0-2]、[3-8] 和 [9-12]。
- minAge 和 maxAge 都是闭区间,其中 minAge 将大于或等于 0,maxAge 应小于或等于 maxChildAge。
- 儿童定价将基于与客房相同的金额类型(AAT/ABT)。
- 当推送 byAge 的儿童价时,childCount 字段将从成人和儿童的费率组合中删除。
此回答是否有所帮助? 是 否
Send feedback